package org.springblade.pm.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;


@Data
@TableName("blade_pm_risk")
@EqualsAndHashCode
public class Risk implements Serializable {

	private static final long serialVersionUID = 1L;
	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	@ApiModelProperty(value = "主键id")
	private Integer id;

	@ApiModelProperty(value = "项目ID")
	private Integer projectId;

	@ApiModelProperty(value = "风险类别")
	private Integer category;

	@ApiModelProperty(value = "风险描述")
	private String des;

	@ApiModelProperty(value = "可能发生阶段")
	private Integer possibleStage;

	@ApiModelProperty(value = "风险概率")
	private Float probability;

	@ApiModelProperty(value = "风险影响")
	private Integer traffic;

	@ApiModelProperty(value = "应对策略")
	private Integer countermeasure;

	@ApiModelProperty(value = "缓解措施")
	private String mitigationActions;

	@ApiModelProperty(value = "提出人")
	private String proposeBy;

	@ApiModelProperty(value = "责任人")
	private String responsibilityBy;

	@ApiModelProperty(value = "状态")
	private Integer status;

	@ApiModelProperty(value = "缓解措施执行情况")
	private Integer implementation;

	@ApiModelProperty(value = "应急措施")
	private String emergencyMeasure;

	@DateTimeFormat(pattern="yyyy-MM-dd")//接受前台的时间格式 传到后台的格式
	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")//作用：后台的时间 格式化 发送到前台
	@ApiModelProperty(value = "风险识别日期")
	private Date distinguishDate;

	@ApiModelProperty(value = "风险处理人")
	private String handleBy;

	@ApiModelProperty(value = "跟踪时间")
	@DateTimeFormat(pattern="yyyy-MM-dd")//接受前台的时间格式 传到后台的格式
	@JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")//作用：后台的时间 格式化 发送到前台
	private Date trackingTime;

	@ApiModelProperty(value = "风险属性")
	private Integer attribute;

	@ApiModelProperty(value = "创建人")
	private Integer createUser;

	@ApiModelProperty(value = "创建时间")
	private Date createTime;

	@ApiModelProperty(value = "修改人")
	private Integer updateUser;

	@ApiModelProperty(value = "修改时间")
	private Date updateTime;

	/**
	 * 状态[0:未删除,1:删除]
	 */
	@TableLogic
	@ApiModelProperty(value = "是否已删除")
	private Integer isDeleted;
}
